<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>文件上传</title>
		<!--EasyUI Start-->
		<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
		<script type="text/javascript" src="../../jquery-1.6.min.js"></script>
		<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../locale/easyui-lang-zh_CN.js"></script>
		<!--EasyUI end-->
		<script type="text/javascript">
			function getFileData(){
				var i = $("#ddContentIframe")[0];
				var i1=  window.frames["ddContentIframe"];
				//alert(document.getElementById('ddContentIframe').contentWindow.getData111111);
				
				//alert(i.contentWindow.getData);
				var rows = i.contentWindow.getData();
			
				alert(rows.length);
			}
			
			
			
			function doAttOpen(){
				$("#dd").show();
				$("#ddContentIframe").attr("src",'vinSwfUpload-1.2-demo.html');
				$("#dd").dialog({
					modal:true,
					resizable:true,
					buttons:[
						{
							'text':'确定',
							handler:getFileData
						},
						{
							'text':'取消',
							handler:function(){
								
								//alert('取消');
								$("#dd").dialog("close");
							}
						}
					]
				});
			}
			
		</script>
    </head>
    <body>
            <table border="0" cellspacing="1" cellpadding="5" align="center" id="info">
                <tbody>
                    <tr>
                        <td class="title">
                            附件一<span class="star">*</span>
                        </td>
                        <td colspan="3">
                        	<!--doAttOpen('ACCESSORY1','1318834104527371883447','a1','0');-->
                            <input type="button" id="attBt1" value="上传图片" class="button" onclick="doAttOpen()">
                            <br>
                            (图片资料,图片类型为gif,jpg) &nbsp;(附件大小不能超过5MB,最多可上传10个附件) 
                            <br>
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            附件二
                        </td>
                        <td colspan="3">
                            <input name="button" id="attBt2" type="button" class="button" onclick="doAttOpen('ACCESSORY2','1318834104527371883447','a2','0');" value="上传附件">（文本、音频资料）
                            &nbsp;(附件大小不能超过5MB,最多可上传10个附件)
                            <br>
                            &nbsp;<span id="a2">&nbsp;&nbsp;<a href="target=_blank"></a></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            附件三 
                        </td>
                        <td>
                            <input name="button" id="attBt3" type="button" class="button" onclick="doAttOpen('ACCESSORY3','1318834104527371883447','a3','0');" value="上传附件">（视频资料）
                            &nbsp;<span class="star">(附件大小不能超过5MB,最多可上传10个附件)</span>
                            <br>
                            &nbsp; <span id="a3">&nbsp;&nbsp;<a href="target=_blank"></a></span>
                        </td>
                    </tr>
                </tbody>
            </table>
			<div id="dd" title="图片上传" style="width:610px;height:510px;display:none;" > 
			   		<iframe id="ddContentIframe"  src="" style="width:100%;height:100%;"></iframe>  
			</div>
			
    </body>
</html>
